package apiroutes

import (
	"dataaysn/internal/service"

	"github.com/gin-gonic/gin"
)

func RegisterTaskRoutes(r *gin.Engine, taskService *service.TaskService) {
	taskGroup := r.Group("/api/tasks")
	{
		taskGroup.POST("", taskService.CreateTask)
		taskGroup.GET("", taskService.ListTasks)
		taskGroup.GET("/:id", taskService.GetTask)
		taskGroup.PUT("/:id", taskService.UpdateTask)
		taskGroup.DELETE("/:id", taskService.DeleteTask)
		taskGroup.PATCH("/:id/status", taskService.ToggleTaskStatus)
	}
}
